program P9_2;
var s:string[200];
    i,j:integer;
    freq:array['a'..'z'] of integer;
    c:char;
begin
writeln('Enter a string:');
readln(s);
for c:='a' to 'z' do freq[c]:=0;
for i:=1 to length(s) do inc(freq[s[i]]);
for c:='a' to 'z' do 
	if ( freq[c] > 0 ) then begin
		write(c);
		write(freq[c],' ');
		end;
writeln;
writeln('end.');
end.
